package com.webchat.admin.service;


import com.webchat.common.bean.APIResponseBean;
import com.webchat.common.bean.APIResponseBeanUtil;
import com.webchat.domain.vo.response.UserBaseResponseInfoVO;
import com.webchat.rmi.user.UserServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountService {


    @Autowired
    private UserServiceClient userServiceClient;


    public UserBaseResponseInfoVO accountInfo(String account) {

        APIResponseBean<UserBaseResponseInfoVO> responseBean = userServiceClient.userInfo(account);
        if (APIResponseBeanUtil.isOk(responseBean)) {
            return responseBean.getData();
        }
        return null;
    }

}
